package com.insider.domain.row;

import com.insider.domain.PassKeeper;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class PassKeeperRowMapper implements RowMapper {

    @Override
    public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
        PassKeeper passKeeper = new PassKeeper();
        passKeeper.setId(rs.getLong("pass_keeper_id"));
        passKeeper.setAssociation(rs.getString("association"));
        passKeeper.setLogin(rs.getString("login"));
        passKeeper.setPassword(rs.getString("password"));
        passKeeper.setUserId(rs.getLong("userId"));

        return passKeeper;
    }
}
